<%
Dim conn
Dim rs
Dim sqlcount
Dim getcount
F_ID = Request.Form.Item("F_ID")
F_NAME = Request.Form.Item("F_NAME")
F_REGISTER_NUM = Request.Form.Item("F_REGISTER_NUM")
F_ECONIMIC_CODE = Request.Form.Item("F_ECONIMIC_CODE")
F_POSTI_CODE = Request.Form.Item("F_POSTI_CODE")
F_TEL_NUM = Request.Form.Item("F_TEL_NUM")
F_FAX_NUM = Request.Form.Item("F_FAX_NUM")

F_ID = Replace(F_ID,"'","")
F_NAME = Replace(F_NAME,"'","")
F_REGISTER_NUM = Replace(F_REGISTER_NUM,"'","")
F_ECONIMIC_CODE = Replace(F_ECONIMIC_CODE,"'","")
F_POSTI_CODE = Replace(F_POSTI_CODE,"'","")
F_TEL_NUM = Replace(F_TEL_NUM,"'","")
F_FAX_NUM = Replace(F_FAX_NUM,"'","")
set conn = Server.Createobject("ADODB.Connection")
set  rs = Server.Createobject("ADODB.Recordset")
ConnStr = "DSN=dbpr_sql;UID=sa;PWD=hhhhhhhh;"
conn.Mode = 3
conn.Open (ConnStr)
sqlcount = "SELECT MAX() as numlines FROM SELLER"
set rs = conn.execute(sqlcount)
getcount = rs.fields("numlines")
Session("tablecount") = getcount
Session("Tablename") = Session("Tablename") 
Session("fieldname") = Session("fieldname")
SQL="INSERT INTO SELLER(ID,NAME,REGISTER_NUM,ECONIMIC_CODE,POSTI_CODE,TEL_NUM,FAX_NUM) VALUES(" & F_ID & "," & "'" & F_NAME & "'" & "," & "'" & F_REGISTER_NUM & "'" & "," & "'" & F_ECONIMIC_CODE & "'" & "," & "'" & F_POSTI_CODE & "'" & "," & "'" & F_TEL_NUM & "'" & "," & "'" & F_FAX_NUM & "'"  & ")"
set rs = conn.execute(SQL)
conn.close
set rs = Nothing
set conn = Nothing
Response.redirect("INS_SELLER1.asp")
%>
